import React, { Component } from 'react';
import { Link} from 'react-router';
import { connect } from 'react-redux';

class SideLeft extends Component {

  constructor(props){
    super(props);
    this.state = {
        sul: {display:"block"},
		gly: "glyphicon glyphicon-s glyphicon-plus"
    };
  }

  render() {
			return (
				<div id="sidebar-collapse" className="col-sm-3 col-lg-2 sidebar">
					<ul className="nav menu">
						<li className="parent ">
							<Link to="/main/orderall" activeClassName="sidebar-a">
								<span className="glyphicon glyphicon-list"></span> 
								全部订单
							</Link>
							<ul className="children collapse" style={this.state.sul}>
								<li>
									<Link  to="/main/ordergoing" activeClassName="sidebar-inner">
											<span className="glyphicon glyphicon-record"></span> 正在交易
									</Link>
								</li>
								<li>
									<Link  to="/main/ordercanceling" activeClassName="sidebar-inner">
										<span className="glyphicon glyphicon-ok-sign"></span> 待取消
									</Link>
								</li>
								<li>
									<Link  to="/main/orderfinish" activeClassName="sidebar-inner">
										<span className="glyphicon glyphicon-ok-sign"></span> 已完成
									</Link>
								</li>
								<li>
									<Link  to="/main/ordercancel" activeClassName="sidebar-inner">
										<span className="glyphicon glyphicon-minus-sign"></span> 已取消
									</Link>
								</li>
							</ul>
						</li>
						<li className="parent ">
							<Link to="/main/profileall" activeClassName="sidebar-a">
								<span className="glyphicon glyphicon-list"></span> 
								所有用户
							</Link>
							<ul className="children collapse" style={this.state.sul}>
								<li>
									<Link  to="/main/profilepending" activeClassName="sidebar-inner">
											<span className="glyphicon glyphicon-record"></span> 待审核
									</Link>
								</li>
								<li>
									<Link  to="/main/profilepass" activeClassName="sidebar-inner">
										<span className="glyphicon glyphicon-ok-sign"></span> 已通过
									</Link>
								</li>
								<li>
									<Link  to="/main/profilenopass" activeClassName="sidebar-inner">
										<span className="glyphicon glyphicon-ok-sign"></span> 未通过
									</Link>
								</li>
							</ul>
						</li>
						<li>
							<Link to="/main/invoice" activeClassName="sidebar-a">
								<span className="glyphicon glyphicon-user"></span>发票设置
							</Link>
						</li>
						<li>
							<Link to="/main/account" activeClassName="sidebar-a">
								<span className="glyphicon glyphicon-user"></span>个人信息
							</Link>
						</li>
					</ul>


					{/*<div className="sideleft-bottom">
						<p>本月剩余发票</p>
						<div>
							<div>{invoice.remainInvoice == null ? "无信息" :invoice.remainInvoice}</div>
							<div>
								<p>本月最迟开票日:</p>
								<p>{invoice.latestMakeInvoiceTimeOfThisMonth == null ? "无信息" :invoice.latestMakeInvoiceTimeOfThisMonth}</p>
								<p>下月最早开票日:</p>
								<p>{invoice.latestMakeInvoiceTimeOfNextMonth == null ? "无信息" :invoice.latestMakeInvoiceTimeOfThisMonth}</p>
							</div>
						</div>
					</div>*/}
				</div>
			)
  }
}

export default connect((state) => {
    const { authReducer } = state;
    return {
        authReducer
    }
})(SideLeft); 